/*
 * @Author: your name
 * @Date: 2020-09-18 10:44:29
 * @LastEditTime: 2020-10-05 09:59:11
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \egg-RESTfulAPI\app\model\carRealTime.js
 */
module.exports = app => {
  const mongoose = app.mongoose
  const CarRealTimeSchema = new mongoose.Schema({
    时间: { type: String, unique: false },
    状态: [{
      车牌号: { type: String, unique: false },
      车辆类型: { type: Number, unique: false },
      车种: { type: Number, unique: false },
      经度: { type: Number, unique: false },
      纬度: { type: Number, unique: false },
      转向角: { type: Number, unique: false },
      运行时长: { type: Number, unique: false },
      途径ETC门架: [{
        ETC门架ID: { type: String, unique: false },
        ETC门架名称: { type: String, unique: false },
        经过ETC门架的时间: { type: String, unique: false },
      }],
      途径路段车速: [{
        路段ID: { type: Number, unique: false },
        路段速度: { type: Number, unique: false },
      }],
    }],
  })
  return mongoose.model('CarRealTime', CarRealTimeSchema)
}



